package com.zhao.fishingguideserver.service.impl;

import com.zhao.fishingguideserver.POJO.Fish;
import com.zhao.fishingguideserver.mapper.FishMapper;
import com.zhao.fishingguideserver.service.FishService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 鱼类信息服务实现类
 */
@Service
public class FishServiceImpl implements FishService {
    @Autowired
    private FishMapper fishMapper;
    
    @Override
    public List<Fish> selectAll() {
        return fishMapper.selectAll();
    }
    
    @Override
    public Fish selectById(Integer id) {
        return fishMapper.selectById(id);
    }
    
    @Override
    public List<Fish> searchByKeyword(String keyword) {
        return fishMapper.searchByKeyword(keyword);
    }
    
    @Override
    public List<Fish> filterByHabitat(String habitat) {
        return fishMapper.filterByHabitat(habitat);
    }
    
    @Override
    public List<Fish> filterByDistribution(String distribution) {
        return fishMapper.filterByDistribution(distribution);
    }
}
